<style media=print type="text/css">
.word_btn {
	visibility: hidden;
}

.breadcrumbs {
	visibility: hidden;
}
</style>
<title>武汉市园林和林业局行政处罚案件调查笔录</title>
<!-- /section:settings.box -->
<div class="col-xs-12 category_add">
<?php
$contentQ = explode ( '★', $model ['contentsequence'] );
?>
	<div class="word_body Js_print">
		<div class="word_bd">
			<h1 class="word_h1">武汉市园林和林业局行政处罚案件调查笔录</h1>
			<div class="word_bianh text-right">
				共<span class="word_span"></span>页
			</div>
			<div class="word_text" style="text-indent: 0em">
				<p>
					案由 <input type="text" class="word_text" id="hx_txt_A1"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 40px;"
						value="<?=$contentQ[0]?>">
				</p>
				<p>
					被调条查人<input type="text" class="word_text" id="hx_txt_A2"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 40px"
						class="input_inline" value="<?=$contentQ[1]?>">性别<input
						type="text" class="word_text" id="hx_txt_A3"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 5px; width: 80px;"
						value="<?=$contentQ[2]?>">年龄<input type="text" class="word_text"
						id="hx_txt_A4"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 5px; width: 80px"
						value="<?=$contentQ[3]?>">与当事人关系<input type="text"
						class="word_text" id="hx_txt_A5"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 5px; width: 80px"
						value="<?=$contentQ[4]?>">工作单位（住址）、电话<input type="text"
						class="word_text" id="hx_txt_A6"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 80px"
						value="<?=$contentQ[5]?>">
				</p>
				<p>
					职务<input type="text" class="word_text" id="hx_txt_A7"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px"
						value="<?=$contentQ[6]?>">
				</p>
				<p>
					调查时间<input type="text" class="word_text" id="hx_txt_A8"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 100px"
						value="<?=$contentQ[7]?>">
				</p>
				<p>
					调查地点<input type="text" class="word_text" id="hx_txt_A9"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px"
						value="<?=$contentQ[8]?>">
				</p>
				<p>
					调查人<input type="text" class="word_text" id="hx_txt_A10"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px"
						value="<?=$contentQ[9]?>">
				</p>
				<p>
					记录人<input type="text" class="word_text" id="hx_txt_A11"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px"
						value="<?=$contentQ[10]?>">
				</p>

				<div class="js_question">
					<div>
						<span onclick="sub_add()">增加</span>
					</div>
					<ul class="js_ul">
				<?php
				$qu_an = explode ( "■", $contentQ [11] );
				$quList = explode ( ☆, $qu_an [0] );
				$anList = explode ( ☆, $qu_an [1] );
				if (count ( $quList ) > 0) {
					for($i = 0; $i < count ( $quList ); $i ++) {
						?>
						<li class="js_ul_li">
							<div>
								<span>问:</span><input type="text" name="hx_txt_A12_q"
									style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px"
									value="<?=$quList[$i]?>">
							</div>
							<div>
								<span>答:</span><input type="text" name="hx_txt_A12_a"
									style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px"
									value="<?=$anList[$i]?>">
							</div>
							<div>
								<span onclick="sub_delete(this)">删除</span>
							</div>
						</li>
						<?php
					}
				} else {
					?>
				<li class="js_ul_li">
							<div>
								<span>问:</span><input type="text" name="hx_txt_A12_q" value=""
									style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px">
							</div>
							<div>
								<span>答:</span><input type="text" name="hx_txt_A12_a" value=""
									style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px">
							</div>
							<div>
								<span onclick="sub_delete(this)">删除</span>
							</div>
						</li>
				<?php
				}
				
				?>
			</ul>
				</div>

				<p>
					调查人<input type="text" class="word_text" id="hx_txt_A13"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px"
						value="<?=$contentQ[12]?>">记录人<input type="text" class="word_text"
						id="hx_txt_A14"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px"
						value="<?=$contentQ[13]?>">被调查人<input type="text"
						class="word_text" id="hx_txt_A15"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px"
						value="<?=$contentQ[14]?>">时间<input type="text" class="word_text"
						id="hx_txt_A16"
						style="border: 0px; border-bottom: 1px solid #333; padding: 0 2px; width: 150px"
						value="<?=$contentQ[15]?>">
				</p>
			</div>
		</div>
	</div>
	<div class="space-4"></div>
	<div class="clearfix form-actions">
		<div class="col-md-offset-3 col-md-9">
			<button class="btn btn-info save" type="button" id="btnSubmit">
				<i class="ace-icon fa fa-check bigger-110"></i>保存
			</button>
			&nbsp; &nbsp;
			<button class="btn" type="reset">
				<i class="ace-icon glyphicon glyphicon-remove bigger-110"></i>还原
			</button>
		</div>
	</div>
</div>
<script type="text/javascript">
var scripts = [null,  null];
$('.page-content-area').ace_ajax('loadScripts', scripts, function() {
	var $scope = $(".category_add");
	$("#btnSubmit").click(function(){							
		var A1 = $("#hx_txt_A1",$scope).val();
		var A2 = $("#hx_txt_A2",$scope).val();
		var A3 = $("#hx_txt_A3",$scope).val();
		var A4 = $("#hx_txt_A4",$scope).val();
		var A5 = $("#hx_txt_A5",$scope).val();
		var A6 = $("#hx_txt_A6",$scope).val();
		var A7 = $("#hx_txt_A7",$scope).val();
		var A8 = $("#hx_txt_A8",$scope).val();
		var A9 = $("#hx_txt_A9",$scope).val();
		var A10 = $("#hx_txt_A10",$scope).val();
		var A11 = $("#hx_txt_A11",$scope).val();
		var A12 = $("#hx_txt_A12",$scope).val();
		var A13 = $("#hx_txt_A13",$scope).val();
		var A14 = $("#hx_txt_A14",$scope).val();
		var A15 = $("#hx_txt_A15",$scope).val();	
		var A16 = $("#hx_txt_A16",$scope).val();		
		var category =3;
		var be_punished_man= A1;
		var ques=$("input[name='hx_txt_A12_q']");
		var anse=$("input[name='hx_txt_A12_a']");
		var queq="";//问题序列
		var ansq="";//回答序列
		
		for(var i=0;i<ques.length;i++)
		{
			queq=queq+$(ques[i]).val()+"☆";
			ansq=ansq+$(anse[i]).val()+"☆";
		}
		queq=queq.substr(0,queq.length-1);
		ansq=ansq.substr(0,ansq.length-1);
		var A12=queq+"■"+ansq;
		var contentsequence = A1+"★"+A2+"★"+A3+"★"+A4+"★"+A5+"★"+A6+"★"+A7+"★"+A8+"★"+A9+"★"+A10+"★"+A11+"★"+A12+"★"+A13+"★"+A14+"★"+A15+"★"+A16;
		$.post('/administrative/Ajax_administrative_add',{
			'id':'<?=$model['id']?>',
			'master_id':'<?=$master_id?>',
			'contentsequence':contentsequence,
			'category':category,
			'be_punished_man':be_punished_man
			},function(data){
				if (200 === data.status) {
					message_box.show(data.data);
					//gDialog.fClose();
					location.href="/#administrative/list?id=<?=$master_id?>";					
				} else {
					message_box.show(data.data);
				}
			 
		},'json');
	});		
});
function sub_add(){
	var clone= $(".js_ul li:eq(0)").clone();
	clone.find("input[name='hx_txt_A12_q']").val("");
	clone.find("input[name='hx_txt_A12_a']").val("");
	$(".js_ul").append(clone);
	
}
function sub_delete(obj)
{
	if($(".js_ul li").length>1){
		$(obj).closest("li").remove();
	}
}	
</script>

